﻿@model com.fmtx.Model.Country
@{
    ViewBag.Title = "Index";
}

<div class="row">
      <div class="span3 bs-docs-sidebar" style="height:500px;">
        <ul id="areamenu" class="nav nav-list bs-docs-sidenav affix">
            @if(ViewBag.area!=null){
                foreach (var item in ViewBag.area)
                {
                    <li data-tag="area_@item.Id" class="@(Model.AreaId==item.Id?"active":"")">
                        <a href="/area/@item.Id" ><i class="icon-chevron-right"></i> @item.Name</a></li>
                }
            }
        </ul>
        </div>
      <div class="span9">
        <!-- Typography
        ================================================== -->
        <div style="margin-top:30px;padding-top: 1px;">
        <ul class="unstyled lifloat">
            @if (ViewBag.clist != null)
            {
                foreach (var cc in ViewBag.clist)
                {
                    <li><span style="@(Convert.ToInt32(Html.ViewContext.RouteData.Values["id"])==cc.Id?"background-color: burlywood;":"")"  class="spantagbox"><a href="/country/@cc.Id" >@cc.Name</a></span></li>
                }
            }
        </ul>
        </div>
          <div class="clear"></div>
            @if (ViewBag.citys != null)
            {
                foreach (var item in ViewBag.citys)
                {
                    <section  style="margin-top:30px;padding-top: 1px;" >
                      <div style="float:left; padding-right:10px;">
                                   <a href="/City/@item.Id"> <img src="@StaticCs.ImageUrl/img?m=overcut&w=120&h=80&file=@item.Pic"></a>
                                </div>
                        <div style="margin-bottom:5px;">
                                    <div><h4>@item.Name</h4></div>
                                    <div> <a href="/city/@item.Id">@item.Summary</a></div>
                                </div>
                    </section>
                }
            }
          @Html.Partial("_Paging")
        <div class="clear"></div>
      </div>
</div>
<div class="clear"></div>
@section scripts{
    <script type="text/javascript">
        $("#areamenu li").click(function () {
            $(this).addClass("active").siblings("li").removeClass("active");
            var tag = $(this).attr("data-tag");

        });
    </script>
  } 